package com.bm.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName ejyy_contract
 */
@TableName(value ="ejyy_contract")
@Data
public class EjyyContract implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 
     */
    private Long communityId;

    /**
     * 
     */
    private String title;

    /**
     * 
     */
    private Long categoryId;

    /**
     * 
     */
    private String firstParty;

    /**
     * 
     */
    private String firstPartyLinkman;

    /**
     * 
     */
    private String firstPartyPhone;

    /**
     * 
     */
    private String secondParty;

    /**
     * 
     */
    private String secondPartyLinkman;

    /**
     * 
     */
    private String secondPartyPhone;

    /**
     * 
     */
    private Long secondPartyWechatMpUserId;

    /**
     * 
     */
    private Long beginTime;

    /**
     * 
     */
    private Long finishTime;

    /**
     * 
     */
    private Double contractFee;

    /**
     * 
     */
    private Long createdBy;

    /**
     * 
     */
    private Long createdAt;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        EjyyContract other = (EjyyContract) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCommunityId() == null ? other.getCommunityId() == null : this.getCommunityId().equals(other.getCommunityId()))
            && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
            && (this.getCategoryId() == null ? other.getCategoryId() == null : this.getCategoryId().equals(other.getCategoryId()))
            && (this.getFirstParty() == null ? other.getFirstParty() == null : this.getFirstParty().equals(other.getFirstParty()))
            && (this.getFirstPartyLinkman() == null ? other.getFirstPartyLinkman() == null : this.getFirstPartyLinkman().equals(other.getFirstPartyLinkman()))
            && (this.getFirstPartyPhone() == null ? other.getFirstPartyPhone() == null : this.getFirstPartyPhone().equals(other.getFirstPartyPhone()))
            && (this.getSecondParty() == null ? other.getSecondParty() == null : this.getSecondParty().equals(other.getSecondParty()))
            && (this.getSecondPartyLinkman() == null ? other.getSecondPartyLinkman() == null : this.getSecondPartyLinkman().equals(other.getSecondPartyLinkman()))
            && (this.getSecondPartyPhone() == null ? other.getSecondPartyPhone() == null : this.getSecondPartyPhone().equals(other.getSecondPartyPhone()))
            && (this.getSecondPartyWechatMpUserId() == null ? other.getSecondPartyWechatMpUserId() == null : this.getSecondPartyWechatMpUserId().equals(other.getSecondPartyWechatMpUserId()))
            && (this.getBeginTime() == null ? other.getBeginTime() == null : this.getBeginTime().equals(other.getBeginTime()))
            && (this.getFinishTime() == null ? other.getFinishTime() == null : this.getFinishTime().equals(other.getFinishTime()))
            && (this.getContractFee() == null ? other.getContractFee() == null : this.getContractFee().equals(other.getContractFee()))
            && (this.getCreatedBy() == null ? other.getCreatedBy() == null : this.getCreatedBy().equals(other.getCreatedBy()))
            && (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCommunityId() == null) ? 0 : getCommunityId().hashCode());
        result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
        result = prime * result + ((getCategoryId() == null) ? 0 : getCategoryId().hashCode());
        result = prime * result + ((getFirstParty() == null) ? 0 : getFirstParty().hashCode());
        result = prime * result + ((getFirstPartyLinkman() == null) ? 0 : getFirstPartyLinkman().hashCode());
        result = prime * result + ((getFirstPartyPhone() == null) ? 0 : getFirstPartyPhone().hashCode());
        result = prime * result + ((getSecondParty() == null) ? 0 : getSecondParty().hashCode());
        result = prime * result + ((getSecondPartyLinkman() == null) ? 0 : getSecondPartyLinkman().hashCode());
        result = prime * result + ((getSecondPartyPhone() == null) ? 0 : getSecondPartyPhone().hashCode());
        result = prime * result + ((getSecondPartyWechatMpUserId() == null) ? 0 : getSecondPartyWechatMpUserId().hashCode());
        result = prime * result + ((getBeginTime() == null) ? 0 : getBeginTime().hashCode());
        result = prime * result + ((getFinishTime() == null) ? 0 : getFinishTime().hashCode());
        result = prime * result + ((getContractFee() == null) ? 0 : getContractFee().hashCode());
        result = prime * result + ((getCreatedBy() == null) ? 0 : getCreatedBy().hashCode());
        result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", communityId=").append(communityId);
        sb.append(", title=").append(title);
        sb.append(", categoryId=").append(categoryId);
        sb.append(", firstParty=").append(firstParty);
        sb.append(", firstPartyLinkman=").append(firstPartyLinkman);
        sb.append(", firstPartyPhone=").append(firstPartyPhone);
        sb.append(", secondParty=").append(secondParty);
        sb.append(", secondPartyLinkman=").append(secondPartyLinkman);
        sb.append(", secondPartyPhone=").append(secondPartyPhone);
        sb.append(", secondPartyWechatMpUserId=").append(secondPartyWechatMpUserId);
        sb.append(", beginTime=").append(beginTime);
        sb.append(", finishTime=").append(finishTime);
        sb.append(", contractFee=").append(contractFee);
        sb.append(", createdBy=").append(createdBy);
        sb.append(", createdAt=").append(createdAt);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}